import {
  http
} from "@/utils/http.js"


// 获取患者列表信息
export const getpatientInfoListApi = () => {
  return http.get('/patient/mylist', {}, {
    header: {
      "Content-Type": "application/json"
    }
  })
}


// 添加患者
export const addPatientInfoApi = (data) => {
  return http.post('/patient/add', data, {
    header: {
      "Content-Type": "application/json"
    }
  })
}

// 获取单个患者详细信息
export const patientInfoApi = (id) => {
  return http.get(`/patient/info/${id}`, {}, {
    header: {
      "Content-Type": "application/json"
    }
  })
}


// 编辑患者信息
export const editPatientInfoApi = (data) => {
  return http.put("/patient/update", data, {
    header: {
      "Content-Type": "application/json"
    }
  })
}

// 删除患者
export const delPatientInfoApi = (id) => {
  return http.delete(`/patient/del/${id}`, {}, {
    header: {
      "Content-Type": "application/x-www-form-urlencoded"
    }
  })
}